import { Entity, PrimaryColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';

@Entity({ name: 'position' })
export class PositionEntity {
  @PrimaryColumn({ length: 32 })
  id: string;

  @Column({ length: 20, nullable: true, comment: '职位名' })
  name: string;

  @Column({ length: 20, nullable: true, comment: '职位待遇' })
  treatment: string;

  @Column({ type: 'text', nullable: true, comment: '职位要求' })
  requirement: string;

  @Column({ length: 200, nullable: true, comment: '职位描述' })
  description: string;

  @Column({ type: 'tinyint', default: 1, comment: '职位状态: 0已下架 1发布中' })
  status: number;

  @Column({ length: 32, comment: '企业id' })
  eid: string;

  @CreateDateColumn()
  create_at: Date;

  @UpdateDateColumn()
  update_at: Date;
}